# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=graphinder
pkgver=1.11.6
pyver=3.10
pkgrel=6
pkgdesc='GraphQL endpoints finder using subdomain enumeration, scripts analysis and bruteforce.'
arch=('any')
groups=('blackarch' 'blackarch-recon' 'blackarch-scanner' 'blackarch-webapp')
url='https://github.com/Escape-Technologies/graphinder'
license=('MIT')
depends=('python' 'python-requests' 'python-beautifulsoup4' 'python-aiohttp')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('836f8013ec24832f30d93543db33f4962dcc1ad2295fc3a098964b52c8ba6efecf9ce27d5b6f09b4eeaed1b75d96fcd9833a570ae6e05d36efd582b332710932')

build() {
  cd "$pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    "$pkgname"
}

